#!/usr/bin/ruby

class NoValidUrlError < Exception
  
end

class NoValidPicError < Exception
  
end

class Album
  def initialize
    begin
      get_cmd_params
    rescue ArgumentError => e
      puts e.message
      exit
    end
  end
  
  protected
  
  def get_cmd_params
    raise ArgumentError, "Please input a #{self.class.to_s} url!" if ARGV.empty?
    @urls = ARGV
  end  
  
  def create_ablum_folder
    if not File.exist?(@folder_name)
      puts "creating folder #{@folder_name} ..."
      Dir::mkdir(@folder_name)
    end
    puts "Downloaing pics to #{@folder_name}"
  end
end
